'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview boss子项
 * @author sundbcn@gmail.com (sun debing)
 */

var moment = require('moment');
var mongoose = require('mongoose');

var bossItemSchema = new mongoose.Schema({
    // boss id
    boss_id: {
        type: Number,
        require: true
    },

    // 攻击的记录
    attack_list: []
});

bossItemSchema.methods.getBossId = function () {
    return this.boss_id;
};

bossItemSchema.methods.addAttack = function () {

};

bossItemSchema.methods.getAttackNum = function () {
    return this.attack_list.length;
};

if (!bossItemSchema.options.toJSON) {
    bossItemSchema.options.toJSON = {};
}
/* jshint unused:false */
bossItemSchema.options.toJSON.transform = function (doc, ret) {
    delete ret.pass_time;
};

module.exports = bossItemSchema;
